{{csrf_field()}}


<div class="layui-form-item layui-col-md6">
    <label for="" class="layui-form-label">活动名称</label>
    <div class="layui-input-block">
        <input type="text" name="activity_name" value="{{ $data->activity_name ?? '' }}" lay-verify="required"  class="layui-input" >
    </div>
</div>


<div class="layui-form-item  ">
    <div class="layui-inline">
        <label class="layui-form-label">满减规则</label>
        <div class="layui-form-mid">满</div>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="full" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" lay-verify="required"  placeholder="￥" value="{{ $data->full ?? '' }}" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-mid">减</div>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="less" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" lay-verify="required" placeholder="￥" value="{{ $data->less ?? '' }}" autocomplete="off" class="layui-input">
        </div>
    </div>
</div>
<div class="layui-form-item  ">
    <div class="layui-inline">
        <label for=""  class="layui-form-label">有效范围</label>
        <div class="layui-input-block">
            <input type="radio" lay-filter="radio"  name="scope" value="1" title="全部商品" checked >
            <input type="radio" lay-filter="radio"  name="scope" value="2" title="部分商品" {{(isset($data) && $data->scope == 2) ? 'checked' : ''}} >
        </div>
    </div>
</div>
<div class="layui-form-item layui-form-text count">
    <label for="" class="layui-form-label"> </label>
    <div class="layui-input-block">
        <textarea placeholder="请输入内容" name="not_in_goods"  cols="20" class="layui-textarea">{{ $data->not_in_goods ?? ''}}</textarea>
        <div class="layui-form-mid content layui-word-aux">输入不参与该满减活动的商品ID，用“,”隔开</div>
    </div>
</div>


    <div class="layui-form-item layui-col-md6">
        <div class="layui-inline">
            <label class="layui-form-label">开始日期</label>
            <div class="layui-input-inline">
                <input type="text" name="start_at" lay-verify="required"  value="{{ $data->start_at ?? ''}}" class="layui-input" id="test17" placeholder="yyyy-MM-dd">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">结束日期</label>
            <div class="layui-input-inline">
                <input type="text" name="end_at" lay-verify="required"  value="{{ $data->end_at ?? ''}}" class="layui-input" id="test18" placeholder="yyyy-MM-dd">
            </div>
        </div>
    </div>



<div class="layui-form-item">
    <div class="layui-input-block">
        {{isset($data) ? method_field('PUT') : ''}}
        {{csrf_field()}}
        <a  class="layui-btn" href="{{route('offer.index')}}" >返 回</a>
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="layui-form-submit">确 认</button>
    </div>
</div>

